* For ASEC 2013
* Data is downloaded from: https://www.census.gov/data/datasets/time-series/demo/cps/cps-asec.2013.html
* Last downloaded: December 8, 2022

clear
infix long h_seq 2-6 					/// household sequence number (for merge with CBO imputed data)
	  byte pppos 7-8					/// trailer portion of unique household ID (for merge with CBO imputed data)
	  byte record 1						/// 1: household record; 2: family record; 3 person record
	  byte age_orig 19-20				/// age (from original CPS to check merge)
	  byte marital_orig 21				/// marital status (from original CPS to check merge)
	  byte sex_orig 24					/// sex (from original CPS to check merge)
	  byte race_orig 27-28				/// race (from original CPS to check merge)
	  using "Datasets\Census\asec2013_pubuse.dat"
	  
compress

drop if record < 3						// keep only person records (as in IPUMS and CBO)
gen obs_n = _n							// variable for sequential merge

save "Datasets\Census\asec_2013_orig.dta", replace